<!DOCTYPE html>
<html lang="en">
<head>
    <base href="/">
    <meta charset="UTF-8">
    <title>会员管理</title>
    <link rel="stylesheet" href="lib/layui/css/layui.css">
</head>
<body>

<table class="layui-table"
       lay-data="{ url:'vip/getList', page:true, id:'datalist',toolbar:'#top_toolbar'}"
       lay-filter="datalist">
    <thead>
    <tr>
        <th lay-data="{field:'id', sort:true}">ID</th>
        <th lay-data="{field:'name',sort:true}">姓名</th>
        <th lay-data="{field:'tel',sort:true}">电话</th>
        <th lay-data="{field:'createtime'}">创建时间</th>
        <th lay-data="{toolbar:'#line_toolbar'}">操作</th>

    </tr>
    </thead>
</table>
<!--	END数据表格-->


<!--Start 新增窗口-->
<div id="vip_addwin" style="display: none;" class="layui-form" lay-filter="vip_addwin">
    <form id="vip_addform">
        <div class="layui-form-item">
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-inline">
                <input type="text" lay-verify="required|name_test" name="name" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">电话</label>
            <div class="layui-input-inline">
                <input type="text"  lay-verify="required|tel_test"  name="tel" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">创建时间</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" id="testdate_add" name="createtime">
            </div>
        </div>
    </form>
</div>

<!--END 新增-->
<!--Start 编辑窗口-->
<div id="vip_editwin" style="display: none;" class="layui-form" lay-filter="vip_editwin">
    <input type="hidden" name="id">
    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-inline">
            <input type="text" lay-verify="required|login_test" name="name" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">电话</label>
        <div class="layui-input-inline">
            <input type="text" lay-verify="required" name="tel" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">创建日期</label>
        <div class="layui-input-inline">
<!--            <input type="text" lay-verify="required" name="tel" class="layui-input">-->
            <input type="text" class="layui-input" id="testdate_edit" name="createtime">
        </div>
    </div>
</div>
<!--END 编辑-->
<!--<script type="text/html" id="statetext">
    {{#  if(d.state==0){ }}
    <span style='color:#01AAED;'>可登录</span>
    {{#  } else { }}
    <span style='color:#FF5722;'>已离职</span>
    {{#  } }}
</script>-->
<!-- 头部工具栏 -->
<script type="text/html" id="top_toolbar">
    <div class="layui-input-inline">
        <input type="text" name="check" class="layui-input" placeholder="查询">
    </div>
    <button class="layui-btn layui-btn" lay-event="check" style="background-color:#01AAED">查询</button>
    <button class="layui-btn layui-btn" lay-event="add" style="background-color:#FFB800">添加</button>

</script>
<!--行内工具栏
<a class="layui-btn  layui-btn-xs layui-btn-lg" lay-event="edit">编辑</a>
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
-->
<script type="text/html" id="line_toolbar">
    <a class="layui-btn  layui-btn-sm layui-btn-radius" lay-event="edit" >编辑</a>
    <a class="layui-btn layui-btn-sm layui-btn-radius layui-btn-danger" lay-event="del" style="margin-left:0.8px">删除</a>
</script>
<script src="lib/layui/layui.all.js"></script>
<!-- 声明layui需要的对象 -->
<script src="js/layuibase.js"></script>
<script src="js/vip.js"></script>
<!--关于日期的组件-->
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#testdate_add',
            type: 'datetime'//指定元素
        });
    });
</script>
<script>
    //关于时间的
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#testdate_edit',
            type: 'datetime',//指定元素

        });
    });
</script>
</body>
</html>